function fn1 () {
  var user = userInp.value;//用户名表单元素的取值(字符串)
  console.log(user);
  if (user.length >= 6 && user.length <= 12) {


    var firstChar = user.charAt(0);// 取第一个字符
    if (isNaN(firstChar)) {

      var flag = true;
      for (i = 0; i < user.length; i++) {
        var char = user.charAt(i);
        if (normalList.indexOf(char) == -1) {
          flag = false;
          break;
        }
      }
      if (flag) {
        userSpan.innerText = '√';
        userSpan.style.fontSize = '12px';
        userSpan.style.color = 'green';
      } else {
        userSpan.innerText = "用户名由数字,大小写字母,下划线组成";
        userSpan.style.fontSize = "12px";
        userSpan.style.color = "red";
      }

    } else {
      userSpan.innerText = "用户名不能以数字开头";
      userSpan.style.fontSize = "12px";
      userSpan.style.color = "red";
    }




  } else {
    userSpan.innerText = "用户名需要在6-12位之间";
    userSpan.style.fontSize = "12px";
    userSpan.style.color = "red";
  }
}